<div class="page-header">
	<ul id="table-tab" class="nav nav-tabs" role="tablist">
		<li role="presentation" class=""><a href="#perm-platform-tab"
			aria-controls="perm-platform-tab" role="tab" data-toggle="tab">平台权限</a>
		</li>
		<li role="presentation" class=""><a href="#perm-module-tab"
			aria-controls="perm-module-tab" role="tab" data-toggle="tab">模块权限</a>
		</li>
		<li role="presentation" class=""><a href="#perm-menu-tab"
			aria-controls="perm-menu-tab" role="tab" data-toggle="tab">菜单权限</a>
		</li>
		<li role="presentation" class=""><a href="#perm-func-tab"
			aria-controls="perm-func-tab" role="tab" data-toggle="tab">功能权限</a>
		</li>
	</ul>
</div>
<div class="tab-content">
	<div id="perm-platform-tab" class="tab-pane" role="tabpanel">
		<!--:include("tab-platform.html"){}-->
	</div>
	<div id="perm-module-tab" class="tab-pane" role="tabpanel">
		<!--:include("tab-module.html"){}-->
	</div>
	<div id="perm-menu-tab" class="tab-pane" role="tabpanel">
		<!--:include("tab-menu.html"){}-->
	</div>
	<div id="perm-func-tab" class="tab-pane" role="tabpanel">
		<!--:include("tab-func.html"){}-->
	</div>
</div>

<script type="text/javascript">
$(function(){
	$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
		//e.target // 激活的标签页
		//e.relatedTarget // 前一个激活的标签页
		var tabId = $(e.target).attr('aria-controls');
		if(tabId == "perm-platform-tab"){
			initTableList('table-perm-platform','system/admin/permission/dataGrid', 'table-perm-platform-search', 'btn-perm-platform-search');
		} else if(tabId == "perm-module-tab"){
			initTableList('table-perm-module','system/admin/permission/dataGrid', 'table-perm-module-search', 'btn-perm-module-search');
		} else if(tabId == "perm-menu-tab"){
			initTableList('table-perm-menu','system/admin/permission/dataGrid', 'table-perm-menu-search', 'btn-perm-menu-search');
		} else {
			initTableList('table-perm-function','system/admin/permission/dataGrid', 'table-perm-function-search', 'btn-perm-function-search');
		}
	});
	$('#table-tab a[href="#perm-platform-tab"]').tab('show');
});

function queryStatus(value, row, index){
	return value;
}
</script>
